/*
  @author: 13813
  @date: 2024/11/8 14:08
*/
public class ForTest01 {
    public static void main(String[] args) {
//        System.out.println("1");
//        System.out.println("2");

        //打印1-100之间所有的偶数
        for (int a = 1; a <= 100; a++) {
            if (a % 2 == 0) {
//                System.out.println(a);
            }
        }

        //打印1-100之间所有的偶数的个数
        int count = 0;
        for (int a = 1; a <= 100; a++) {
            if (a % 2 == 0) {
                count++;
            }
        }
//        System.out.println(count);

        //打印1-100之间所有数的和
        /*
            循环1：a =  1，和 = 1
            循环2：a =  2，和 = 2 + 1 = 3
            循环3：a =  3，和 = 3+ 2 + 1 = 3 + 3 = 6

         */
        int sum = 0;
        for (int a = 1; a <= 100; a++) {
               sum = sum + a;
        }
        System.out.println(sum);

    }
}
